package com.lgmshare.k3.map;

import android.os.Parcel;
import android.os.Parcelable;

public class MapAddress implements Parcelable {

    public interface CoordinateType {
        int BAIDU_09 = 2;
        int GCJ_02 = 1;
        int NULL = 0;
    }

    private String addressId;
    private String name = "";
    private String mobile = "";
    private String province = "";
    private String provinceCode = "";
    private String city = "";
    private String cityCode = "";
    private String county = "";
    private String countyCode = "";
    private String address = "";
    private String additionaladdress;
    private int coordinateType;//经纬度所属坐标系类别
    private double latitude;
    private double longitude;
    private int locationType;
    private String locationTime;

    public MapAddress(MapAddress address) {
        this.addressId = address.addressId;
        this.name = address.name;
        this.mobile = address.mobile;
        this.province = address.province;
        this.provinceCode = address.provinceCode;
        this.city = address.city;
        this.cityCode = address.cityCode;
        this.county = address.county;
        this.countyCode = address.countyCode;
        this.address = address.address;
        this.additionaladdress = address.additionaladdress;
        this.coordinateType = address.coordinateType;
        this.latitude = address.latitude;
        this.longitude = address.longitude;
        this.locationType = address.locationType;
        this.locationTime = address.locationTime;
    }

    public String getAddressId() {
        return addressId;
    }

    public void setAddressId(String addressId) {
        this.addressId = addressId;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public String getMobile() {
        return mobile;
    }

    public void setMobile(String mobile) {
        this.mobile = mobile;
    }

    public String getProvince() {
        return province;
    }

    public void setProvince(String province) {
        this.province = province;
    }

    public String getProvinceCode() {
        return provinceCode;
    }

    public void setProvinceCode(String provinceCode) {
        this.provinceCode = provinceCode;
    }

    public String getCity() {
        return city;
    }

    public void setCity(String city) {
        this.city = city;
    }

    public String getCityCode() {
        return cityCode;
    }

    public void setCityCode(String cityCode) {
        this.cityCode = cityCode;
    }

    public String getCounty() {
        return county;
    }

    public void setCounty(String county) {
        this.county = county;
    }

    public String getCountyCode() {
        return countyCode;
    }

    public void setCountyCode(String countyCode) {
        this.countyCode = countyCode;
    }

    public String getAddress() {
        return address;
    }

    public void setAddress(String address) {
        this.address = address;
    }

    public String getAdditionaladdress() {
        return additionaladdress;
    }

    public void setAdditionaladdress(String additionaladdress) {
        this.additionaladdress = additionaladdress;
    }

    public int getCoordinateType() {
        return coordinateType;
    }

    public void setCoordinateType(int coordinateType) {
        this.coordinateType = coordinateType;
    }

    public double getLatitude() {
        return latitude;
    }

    public void setLatitude(double latitude) {
        this.latitude = latitude;
    }

    public double getLongitude() {
        return longitude;
    }

    public void setLongitude(double longitude) {
        this.longitude = longitude;
    }

    public int getLocationType() {
        return locationType;
    }

    public void setLocationType(int locationType) {
        this.locationType = locationType;
    }

    public String getLocationTime() {
        return locationTime;
    }

    public void setLocationTime(String locationTime) {
        this.locationTime = locationTime;
    }

    @Override
    public int describeContents() {
        return 0;
    }

    @Override
    public void writeToParcel(Parcel dest, int flags) {
        dest.writeString(this.addressId);
        dest.writeString(this.name);
        dest.writeString(this.mobile);
        dest.writeString(this.province);
        dest.writeString(this.provinceCode);
        dest.writeString(this.city);
        dest.writeString(this.cityCode);
        dest.writeString(this.county);
        dest.writeString(this.countyCode);
        dest.writeString(this.address);
        dest.writeString(this.additionaladdress);
        dest.writeInt(this.coordinateType);
        dest.writeDouble(this.latitude);
        dest.writeDouble(this.longitude);
        dest.writeInt(this.locationType);
        dest.writeString(this.locationTime);
    }

    public MapAddress() {
    }

    protected MapAddress(Parcel in) {
        this.addressId = in.readString();
        this.name = in.readString();
        this.mobile = in.readString();
        this.province = in.readString();
        this.provinceCode = in.readString();
        this.city = in.readString();
        this.cityCode = in.readString();
        this.county = in.readString();
        this.countyCode = in.readString();
        this.address = in.readString();
        this.additionaladdress = in.readString();
        this.coordinateType = in.readInt();
        this.latitude = in.readDouble();
        this.longitude = in.readDouble();
        this.locationType = in.readInt();
        this.locationTime = in.readString();
    }

    public static final Parcelable.Creator<MapAddress> CREATOR = new Parcelable.Creator<MapAddress>() {
        @Override
        public MapAddress createFromParcel(Parcel source) {
            return new MapAddress(source);
        }

        @Override
        public MapAddress[] newArray(int size) {
            return new MapAddress[size];
        }
    };
}
